import type { CSSProperties } from "react";

export interface CheckboxProps<T = string | number> {
  checked?: boolean;
  border?: boolean;
  style?: CSSProperties;
  className?: string;
  value?: T;
  disabled?: boolean;
  label?: string;
  onChange?: (v: T | undefined, checked: boolean) => void;
}

export interface CheckboxGroupProps<T = string | number> {
  value: Array<T>;
  options: Array<CheckboxOption<T>>;
  border?: boolean;
  style?: CSSProperties;
  className?: string;
  disabled?: boolean;
  onChange?: (v: Array<T>) => void;
}

export type CheckboxOption<T> = {
  value: T;
  label?: string;
  disabled?: boolean;
};
